home *** CD-ROM | disk | FTP | other *** search
/ Robotics & Artificial Int…3 (Professional Edition) / Robotics & Artificial Intelligence Tools 2003 (Professional Edition).iso / neural network tool and application / nsinstall.exe / data1.cab / Demos_Files / OLE_Automation / BuildNetworkCode.txt < prev    next >
Encoding:
Text File  |  2002-03-08  |  2.8 KB  |  66 lines

  1. Private Sub cmdBuildNetwork_Click()
  2.  
  3.     Dim NSApp As Object
  4.     Dim NSBB As Object
  5.     Dim inputFilePath As String
  6.     Dim desiredFilePath As String
  7.     
  8.     Set NSApp = CreateObject("NeuroSolutions.Application")
  9.     Set NSBB = NSApp.activeBreadboard
  10.     
  11.     NSApp.maximize
  12.     
  13.     NSBB.setAnimatePoint 20, 225
  14.     NSBB.stampAndMove "Axon", "inputAxon"
  15.     NSBB.send "inputAxon. setRows ( 2 )"
  16.     NSBB.setAnimatePoint 110, 225
  17.     NSBB.stampAndMove "FullSynapse", "hidden1Synapse"
  18.     NSBB.send "inputAxon. connectTo ( ""hidden1Synapse"" )"
  19.     NSBB.setAnimatePoint 200, 225
  20.     NSBB.stampAndMove "TanhAxon", "hidden1Axon"
  21.     NSBB.send "hidden1Axon. setRows ( " & txtHiddenPEs.Text & " )"
  22.     NSBB.send "hidden1Synapse. connectTo ( ""hidden1Axon"" )"
  23.     NSBB.setAnimatePoint 290, 225
  24.     NSBB.stampAndMove "FullSynapse", "outputSynapse"
  25.     NSBB.send "hidden1Axon. connectTo ( ""outputSynapse"" )"
  26.     NSBB.setAnimatePoint 380, 225
  27.     NSBB.stampAndMove "TanhAxon", "outputAxon"
  28.     NSBB.send "outputSynapse. connectTo ( ""outputAxon"" )"
  29.     NSBB.setAnimatePoint 470, 225
  30.     NSBB.stampAndMove "L2Criterion", "criterion"
  31.     NSBB.send "criterion. setRows ( 1 )"
  32.     NSBB.send "outputAxon. connectTo ( ""criterion"" )"
  33.     NSBB.setAnimatePoint 15, 200
  34.     NSBB.stampAndMove "StaticControl", "control"
  35.     NSBB.stampOnAndMove "BackStaticControl", "control"
  36.     NSBB.send "controlBackprop. setGradientClassName ( ""Momentum"" )"
  37.     NSBB.send "controlBackprop. allocateBackpropPlane (  )"
  38.     NSBB.stampOnAndMove "File", "inputAxon"
  39.     
  40.     NSBB.send "file. setName ( ""inputFile"" )"
  41.     NSBB.send "inputFile. setActiveAccessPoint ( ""Pre-Activity"" )"
  42.     inputFilePath = NSApp.pathFromNS("Demos\OLE Automation\box.asc")
  43.     NSBB.send "inputFile. addFile ( """ & inputFilePath & """ , False )"
  44.     NSBB.send "inputFile. setUseDefaultTranslatorForActiveFile ( FALSE,FALSE )"
  45.     NSBB.send "inputFile. setActiveTranslatorName ( ""ASCII - Column"",FALSE )"
  46.     NSBB.send "inputFile. setNormalize ( FALSE )"
  47.     
  48.     NSBB.stampOnAndMove "File", "criterion"
  49.     NSBB.send "file. setName ( ""desiredFile"" )"
  50.     NSBB.send "desiredFile. setActiveAccessPoint ( ""Desired Signal"" )"
  51.     desiredFilePath = NSApp.pathFromNS("Demos\OLE Automation\boxDesired.asc")
  52.     NSBB.send "desiredFile. addFile ( """ & desiredFilePath & """ ,FALSE )"
  53.     NSBB.send "desiredFile. setUseDefaultTranslatorForActiveFile ( FALSE,FALSE )"
  54.     NSBB.send "desiredFile. setActiveTranslatorName ( ""ASCII - Column"",FALSE )"
  55.     NSBB.send "desiredFile. setNormalize ( FALSE )"
  56.  
  57.     NSBB.stampOnAndMove "DataStorage", "criterion"
  58.     NSBB.send "dataStorage. setActiveAccessPoint ( ""Average Cost"" )"
  59.     NSBB.stampOnAndMove "MatrixViewer", "dataStorage"
  60.     NSBB.send "matrixViewer. setName ( ""trainingCostProbe"" )"
  61.         
  62.     NSBB.Select "Null", False
  63.  
  64.     End
  65. End Sub
  66.